<template>
  <div class="vote_container">
    <div class="image_area f_left">
      <div class="share_img"></div>
    </div>
    <div class="text_area f_left">
      <div class="text_content">
        {{ voteMsg.title }}
      </div>
      <div class="text_desc">{{ voteMsg.members }}人参与</div>
      <div class="vote_btn_box">
        <div class="vote_btn">投票</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    voteMsg: {
      typeof: Object,
      required: true,
    },
  },
};
</script>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
  outline: none;
}
.f_left {
  float: left;
}
.vote_container {
  width: 520px;
  height: 80px;
  border: 1px solid #e5e8ef;
  border-radius: 4px;
  cursor: pointer;
  background-color: #fff;
  text-align: left;
  &:hover .text_area {
    box-shadow: 0 3px 10px 0 rgba(213, 216, 219, 0.44);
  }
  .image_area {
    width: 80px;
    height: 80px;
    .share_img {
      background-image: url("/static/video/投票.png");
      border-radius: 3px 0 0 3px;
      background-color: #dff7ff;
      background-size: 28px 28px;
      background-position: center;
      background-repeat: no-repeat;
      height: 100%;
      width: 100%;
    }
  }
  .text_area {
    width: 335px;
    height: 80px;
    padding: 0 90px 0 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    .text_content {
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      letter-spacing: 0;
      font-family: "Microsoft YaHei", "Microsoft Sans Serif",
        "Microsoft SanSerf", "微软雅黑";
      color: #222;
      font-size: 14px;
    }
    .text_desc {
      padding-top: 10px;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      letter-spacing: 0;
      font-family: "Microsoft YaHei", "Microsoft Sans Serif",
        "Microsoft SanSerf", "微软雅黑";
      color: #99a2aa;
      font-size: 12px;
    }
  }
}
.vote_btn_box {
  width: 90px;
  height: 80px;
  text-align: center;
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  .vote_btn {
    width: 54px;
    display: inline-block;
    background-color: #00a1d6;
    border-radius: 4px;
    font-size: 13px;
    line-height: 28px;
    color: #fff;
  }
}
</style>